/* 
 * File:   ProjectorTableModel.h
 * Author: longtran
 *
 * Class that is the model for the table view in the main window.
 *
 * Created on March 15, 2011, 5:21 PM
 */

#ifndef PROJECTORTABLEMODEL_H
#define	PROJECTORTABLEMODEL_H

#include <QtCore/QAbstractTableModel>
#include <QtCore/QMutex>

namespace Projector
{

enum ColumnData
{
    COLUMNDATA_ProjName = 0,
    COLUMNDATA_PowerState,
    COLUMNDATA_InputState,

    COLUMNDATA_Count
};

class ProjectorTableModel : public QAbstractTableModel{

    Q_OBJECT

    ProjectorTableModel(QObject *parent = 0);
    virtual ~ProjectorTableModel();

    static ProjectorTableModel* sInstance;
    static QMutex* sMutex;

public:

    static ProjectorTableModel* GetInstance();

    int rowCount( const QModelIndex &parent = QModelIndex()) const;
    int columnCount( const QModelIndex &parent = QModelIndex()) const;
    
    QVariant data( const QModelIndex &index, int role = Qt::DisplayRole) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;


private:

};

}
#endif	/* PROJECTORTABLEMODEL_H */

